package com.flyduck.system.exception;

import com.flyduck.common.exception.ExceptionCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SystemExceptionCode implements ExceptionCode {

    //8000开始
    CAPTCHA_EXPIRED(8001, "验证码输入错误或者已过期"),
    USER_NOT_FOUND(8002, "用户不存在"),
    PASSWORD_ERROR(8003, "密码错误"),
    PASSWORD_NOT_MATCH(8004, "两次输入的密码不一致"),
    OLD_PASSWORD_NOT_MATCH(8005, "旧密码输入错误"),
    EXIST_CHILDREN_DEPTS(8006,"请先删除子部门"),
    EXIST_CHILDREN_MENUS(8007,"请先删除子菜单");

    private int code;
    private String message;

    /**
     * 异常类型的数字编号
     */
    @Override
    public Integer getCode(){
        return this.code;
    }

    /**
     * 异常类型的描述
     */
    @Override
    public String getMessage(){
        return this.message;
    }
}
